Skip to content

Track CI failures via body island instead of accumulating comments on #37864#38831

Open
jeremymeng wants to merge 2 commits into
mainfrom
jeremymeng/fix-test-failures-body-list
Open

Track CI failures via body island instead of accumulating comments on #37864#38831
jeremymeng wants to merge 2 commits into
mainfrom
jeremymeng/fix-test-failures-body-list

Conversation

@jeremymeng
Copy link
Copy Markdown
Member

Alternative design for #38823. Addresses the concern that appending a tracking comment to #37864 on every run causes the comment list — and the per-run cost of fetching/parsing it — to grow unbounded.

Approach

Move the tracking record from comments into a bounded list inside the body of #37864, maintained via gh-aw's update-issue safe output with operation: replace-island. The framework owns the island markers (<!-- gh-aw-island-start:fix-test-failures --> / <!-- gh-aw-island-end:fix-test-failures -->), so any human-authored content outside them is preserved.

Each entry is a single line:

- #<issue-number> — `<service or package>` — `<error pattern>` — <YYYY-MM-DD>

Reconciliation rule

A failure is "known" only if the linked issue is currently open.

  • Open → keep the entry; if a current failure matches it, exclude that failure from the new issue.
  • Closed → drop the entry from the list. If the same failure recurs in this run it's filed as a fresh issue and re-added in Step 6.

No re-open logic — recurring failures get a brand-new issue rather than reviving a closed one, which is simpler and arguably clearer (the original fix evidently didn't hold).

Changes

  • safe-outputs: drop add-comment; scope update-issue to target: "37864", max: 1, with body updates enabled.
  • "Known Pre-existing Failures": rewritten to parse the island in Tracking: Known pre-existing CI test failures #37864's body and gate entries on current issue state.
  • Step 6: rewritten to emit exactly one update_issue call per run with operation: replace-island and the reconciled list as body. The agent does NOT write the marker lines — the framework injects them.
  • Lock file: regenerated via gh aw compile fix-test-failures. This incidentally bumps github/gh-aw-actions/setup from v0.72.1v0.77.5 in .github/aw/actions-lock.json (the version pinned by my local gh aw). Recompile with v0.72.1 if you'd rather avoid the version bump in this PR.

Why this is better than #38823

Trade-offs vs. #38823

  • Lose the per-run timeline that comments give. If desired, that can be reintroduced later as a single terse summary comment per run, but I'd start without one.
  • No re-open of closed tracked issues. If that behavior is wanted, status: can be added back to update-issue and a small extra rule added to step 2.

Packages impacted by this PR

None (workflow/automation change only).

jeremymeng and others added 2 commits June 4, 2026 16:05
Replaces the per-run add-comment approach on #37864 with a bounded list maintained inside a gh-aw replace-island in the issue body.

- safe-outputs: drop add-comment; scope update-issue to target 37864 with body updates enabled and max:1.

- Known Pre-existing Failures section: parse the tracking island, fetch each linked issue's state, drop entries whose issue is closed (no re-open logic; recurring failures get a fresh issue and a new entry).

- Step 6 rewritten to emit one update_issue call per run with operation: replace-island and the reconciled list as body. The framework owns the island markers (gh-aw-island-start:fix-test-failures / gh-aw-island-end:fix-test-failures).

- Lock file regenerated via gh aw compile (incidentally bumps the github/gh-aw-actions/setup pin from v0.72.1 to v0.77.5 because that is the gh-aw version installed locally).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jeremymeng jeremymeng marked this pull request as ready for review June 4, 2026 23:09
@jeremymeng jeremymeng requested a review from a team as a code owner June 4, 2026 23:09
@jeremymeng jeremymeng requested review from a team and Copilot June 4, 2026 23:09
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the agentic fix-test-failures workflow to track “known pre-existing CI failures” in a bounded body island inside the tracking issue (#37864), instead of accumulating a new tracking comment on every run.

Changes:

  • Adds an update-issue safe-output scoped to issue #37864 (max 1) with body updates enabled.
  • Rewrites “Known Pre-existing Failures” logic to parse a gh-aw island from #37864’s body and to reconcile entries based on whether the linked issue is still open.
  • Adds “Step 6 — Reconcile the Tracking List” to emit a single update_issue call per run using operation: replace-island.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
.github/workflows/fix-test-failures.md Switches known-failure tracking from comments to a bounded body island and documents reconciliation + update behavior.
.github/workflows/fix-test-failures.lock.yml Regenerated compiled workflow reflecting the new update_issue safe-output tool and constraints.

Comment on lines +69 to +72
These markers are managed by the `update-issue` safe output (`operation:
replace-island`). Content **outside** the island is human-authored and must be
preserved exactly. If the markers are not present yet (first run), treat the
tracked list as empty — the framework will create the island on the first update.
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can manually add the marker to the issue if this PR is going to be merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants